$(document).ready(function(){

    var newsDetail=$(".news-detail");
    var enterpriseName=window.localStorage.getItem("enterpriseName")
    //newsDetail.html('<div class="news-detail-header"><h2></h2></div><div class="news-detail-body"></div>');
    var data={
        enterpriseName :enterpriseName
    };

    $.ajax({
        type:"POST",
        url:'http://59.110.114.107:8888/enterprise/getAllEnterpriseInformation',
        data: data,
        success:function (result) {
            //console.log(result.data);
            if(result.meta.success){
                //console.log(result.meta.message);
                if(result.data!=null){
                    var val=result.data["enterpriseInfo List"][0];
                    newsDetail.append('<div class="news-detail-header"><h2>'+val.enterpriseName+'</h2></div><div class="news-detail-body"></div>');
                    $(".news-detail-body").html(val.enterpriseDesc);
                }else{
                    alert(result.meta.message);
                }

            }
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
            alert(XMLHttpRequest.status);
            alert(XMLHttpRequest.readyState);
            alert(textStatus);
        }
    })


});